package top.mczhengyi.xyblog.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.mczhengyi.xyblog.entity.User;
import top.mczhengyi.xyblog.mapper.UserMapper;
import top.mczhengyi.xyblog.service.UserService;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserById(Integer id) {
        return userMapper.selectById(id);
    }

    @Override
    public User getUserByUname(String uname) {
        return userMapper.selectUserByUname(uname);
    }
}
